<?php

// Error reporting.
error_reporting( E_ALL | E_STRICT );
ini_set( 'display_errors', 'on' );


// Modify include path to include path to library.
ini_set( 'include_path', ini_get( 'include_path' ) . PATH_SEPARATOR . 'application/Library' );


// Autoload classes.
function __autoload ( $strClassName ) {

    $arr = explode( "_", $strClassName, 2 );

    switch ( $arr[0] ) {

        case "Core":
            require_once "Core/Loader.php";
            Core_Loader::loadClass( $strClassName );
            break;

        default:

   }

}


$Generator = new Core_Data_Generator ();
$Generator->addDefinition( Core_Directories::DEFINITIONS . "Core/Blacklist.xml" );
$Generator->addDefinition( Core_Directories::DEFINITIONS . "Core/Users.xml" ); // Requires Blacklist.xml.
$Generator->generateModels();

$ServerInformation = new Core_Data_SQL_ServerInformation ();
$ServerInformation->Type = Core_Data_SQL_ServerTypes::MYSQL;
$ServerInformation->Host = "localhost";
$ServerInformation->Username = "root";
$ServerInformation->Password = "";

$Connection = new Core_Data_SQL_Connection( $ServerInformation );
$Generator->generateDatabases( $Connection );

$Generator->report();

?>
